package com.wnnight.wys.entity.payment;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wnnight.wys.entity.config.ChargeConfig;
import com.wnnight.wys.entity.lanlord.Landlord;
import com.wnnight.wys.entity.room.Room;
import lombok.*;

import java.math.BigDecimal;

/**
 * @ClassName: Payment
 * @Description: 缴费记录实体类
 * @author: LJC
 * @date: 2022/8/27-17:08
 */
@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@ExcelIgnoreUnannotated
@TableName("wys_payment_records") //告诉mybatis-plus,数据库表名叫什么
public class PayMentRecords {
    @TableId(type = IdType.AUTO)
    @ExcelProperty(value = "缴费id", index = 0)
    private Integer id;

    @TableField(value = "landlord_id",property = "landlord.id")
    private Landlord landlord; //业主实体类
    @TableField(value = "landlord_id",property = "landlordId")
    private Integer landlordId; //业主类
    @ExcelProperty(value = "业主姓名", index = 2)
    private String landName;

    @TableField("bill_number")
    @ExcelProperty(value = "账单编号", index = 1)
    private String billNumber; //账单编号

    @TableField(value = "room_id",property = "room.id")
    private Room room;
    @TableField(value = "room_id",property = "roomId")
    private Integer roomId; //房屋ID
    @ExcelProperty(value = {"房屋", "楼号"},index = 3)
    private String buildingNum; //楼号
    @ExcelProperty(value = {"房屋", "单元"},index = 4)
    private String unit; //单元
    @ExcelProperty(value = {"房屋", "楼层"},index = 5)
    private String floor; //楼层
    @ExcelProperty(value = {"房屋", "房间号"},index = 6)
    private String roomNum; //房间号

    @TableField(value = "charge_conf_id",property = "chargeConfig.id")
    private ChargeConfig chargeConfig; //账单类目 状态未:n 禁用状态
    @TableField(value = "charge_conf_id",property = "chargeConfId")
    private Integer chargeConfId; //账单类目Id
    @ExcelProperty(value = "账单类目", index = 7)
    private String chargeProject; //收费项目名

    @TableField("billing_cycle")
    @ExcelProperty(value = "计费周期", index = 8)
    private String billingCycle; //计费周期

    @TableField("amount_receivable")
    @ExcelProperty(value = "应收金额", index = 9)

    private BigDecimal amountReceivable; //应收金额
    @TableField("collection_time")
    @ExcelProperty(value = "应收时间", index = 10)
    private String collectionTime; //应收时间

    @TableField(value = "payment_method_id",property = "payMentMethod.id")
    private PayMentMethod payMentMethod; //支付方式
    @TableField(value = "payment_method_id",property = "paymentMethodId")
    @ExcelProperty(value = "支付方式", index = 11)
    private String method; //支付方式

    private Integer paymentMethodId; //支付方式ID

    @TableField("billing_status")
    @ExcelProperty(value = "账单状态", index = 12)
    private String billingStatus; //账单状态 1 已支付 2未支付 d 删除
}
